﻿<%@ Page Language="C#" MasterPageFile="~/Master/Site.Master" AutoEventWireup="true" CodeBehind="DateZT.aspx.cs" Inherits="聚欣订单分析.DateZT" Title="无标题页" %>

<%@ Register Assembly="DevExpress.Web.v18.1, Version=18.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web" TagPrefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_NAV" runat="server">
    <h2>订单状态</h2>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_Contents" runat="server">
    <div class="content-page">
        <div class="content">
            <div class="am-g">
                <!-- Row start -->
                <div class="card-box">
                    <dx:ASPxGridView ID="ASPxGridView1" ClientInstanceName="grid" runat="server" Width="100%"
                        AutoGenerateColumns="False" DataSourceID="SqlDataSource1" KeyFieldName="ID">
                        <ClientSideEvents SelectionChanged="function(s, e) {OnGridSelectionChanged()}" />
                        <Columns>
                            <dx:GridViewCommandColumn Caption="操作" VisibleIndex="0" Width="50px" ShowSelectCheckbox="true">
                             
                            </dx:GridViewCommandColumn>
                            <dx:GridViewDataTextColumn FieldName="ID" VisibleIndex="1" Visible="false">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="年份" VisibleIndex="1" Width="70px">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="订单号" VisibleIndex="2" Width="90px">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="省" VisibleIndex="3" Width="70px">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="地市" VisibleIndex="4" Width="70px">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="运营商" VisibleIndex="4" Width="250px">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="项目" VisibleIndex="4" Width="250px">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="订单金额" VisibleIndex="5">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataDateColumn FieldName="订单日期" VisibleIndex="6">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataDateColumn>
                            <dx:GridViewDataSpinEditColumn FieldName="开票金额" VisibleIndex="6">
                                <EditFormSettings Visible="False" />
                                <PropertiesSpinEdit DecimalPlaces="2">
                                </PropertiesSpinEdit>
                            </dx:GridViewDataSpinEditColumn>
                            <dx:GridViewDataDateColumn FieldName="开票日期" VisibleIndex="6">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataDateColumn>
                            <dx:GridViewBandColumn Caption="回款" VisibleIndex="16">
                                <Columns>
                                    <dx:GridViewDataTextColumn FieldName="已回款" VisibleIndex="16" Width="110px">
                                        <EditFormSettings Visible="False" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataDateColumn FieldName="第一笔回款日期" VisibleIndex="17" Width="110px">
                                        <EditFormSettings Caption="第一笔回款日期" />
                                    </dx:GridViewDataDateColumn>
                                    <dx:GridViewDataSpinEditColumn FieldName="第一笔回款金额" VisibleIndex="18" Width="110px">
                                        <PropertiesSpinEdit DecimalPlaces="2">
                                        </PropertiesSpinEdit>
                                    </dx:GridViewDataSpinEditColumn>
                                    <dx:GridViewDataDateColumn FieldName="第二笔回款日期" VisibleIndex="17" Width="110px">
                                    </dx:GridViewDataDateColumn>
                                    <dx:GridViewDataSpinEditColumn FieldName="第二笔回款金额" VisibleIndex="18" Width="110px">
                                        <PropertiesSpinEdit DecimalPlaces="2">
                                        </PropertiesSpinEdit>
                                    </dx:GridViewDataSpinEditColumn>
                                    <dx:GridViewDataTextColumn FieldName="尾款" VisibleIndex="21" Width="80px">
                                        <EditFormSettings Visible="False" />
                                    </dx:GridViewDataTextColumn>
                                </Columns>
                            </dx:GridViewBandColumn>
                            <dx:GridViewDataTextColumn FieldName="状态" VisibleIndex="18">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <Settings ShowGroupPanel="true" ShowHorizontalScrollBar="true" ShowFilterRow="true" />
                        <SettingsPager PageSize="15">
                        </SettingsPager>
                        <SettingsEditing Mode="PopupEditForm" PopupEditFormVerticalAlign="WindowCenter" PopupEditFormHorizontalAlign="WindowCenter"
                            PopupEditFormWidth="600px" />
                    </dx:ASPxGridView>
                </div>
            </div>
            <!-- Row end -->
        </div>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:JXDDConnectionString %>"
        DeleteCommand="DELETE FROM [tbl_DDB] WHERE [ID] = @ID" InsertCommand="INSERT INTO [tbl_DDB] ([年份], [订单号], [省], [地市], [运营商], [项目], [类型], [有无订单合同], [订单日期], [订单金额], [发货], [发货日期], [结束货期], [开票], [开票日期], [开票金额], [第一笔回款日期], [第一笔回款金额], [第二笔回款日期], [第二笔回款金额], [尾款], [责任人], [合同签订时间], [维保时间], [付款方式], [报账联系人], [订单取消日期], [订单取消], [备注]) VALUES (@年份, @订单号, @省, @地市, @运营商, @项目, @类型, @有无订单合同, @订单日期, @订单金额, @发货, @发货日期, @结束货期, @开票, @开票日期, @开票金额, @第一笔回款日期, @第一笔回款金额, @第二笔回款日期, @第二笔回款金额, @尾款, @责任人, @合同签订时间, @维保时间, @付款方式, @报账联系人, @订单取消日期, @订单取消, @备注)"
        SelectCommand="SELECT *,(第一笔回款金额+第二笔回款金额) as 已回款 FROM [tbl_DDB] where 状态<>'' and 状态<>'回款通过'" UpdateCommand="UPDATE [tbl_DDB] SET [年份] = @年份, [订单号] = @订单号, [省] = @省, [地市] = @地市, [运营商] = @运营商, [项目] = @项目, [类型] = @类型, [有无订单合同] = @有无订单合同, [订单日期] = @订单日期, [订单金额] = @订单金额, [发货] = @发货, [发货日期] = @发货日期, [结束货期] = @结束货期, [开票] = @开票, [开票日期] = @开票日期, [开票金额] = @开票金额, [第一笔回款日期] = @第一笔回款日期, [第一笔回款金额] = @第一笔回款金额, [第二笔回款日期] = @第二笔回款日期, [第二笔回款金额] = @第二笔回款金额, [尾款] = @尾款, [责任人] = @责任人, [合同签订时间] = @合同签订时间, [维保时间] = @维保时间, [付款方式] = @付款方式, [报账联系人] = @报账联系人, [订单取消日期] = @订单取消日期, [订单取消] = @订单取消, [备注] = @备注 WHERE [ID] = @ID"></asp:SqlDataSource>
</asp:Content>
